# Makefile for Xen components
#
- obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o xenconsole.o xen_ksyms.o
+ obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o xenconsole.o
-obj-$(CONFIG_XEN_IA64_DOM0_VP) += hypervisor.o pci-dma-xen.o
+obj-$(CONFIG_XEN_IA64_DOM0_VP) += hypervisor.o pci-dma-xen.o util.o
- pci-dma-xen-$(CONFIG_XEN_IA64_DOM0_VP) := ../../i386/kernel/pci-dma-xen.o
+ pci-dma-xen-$(CONFIG_XEN_IA64_DOM0_VP) := ../../i386/kernel/pci-dma-xen.o
static inline void
xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
{
- if (running_on_xen)
+ if (is_running_on_xen())
__xen_destroy_contiguous_region(vstart, order);
}
+
+// for netfront.c, netback.c
+#define MULTI_UVMFLAGS_INDEX 0 //XXX any value
+
+static inline void
+MULTI_update_va_mapping(
+ multicall_entry_t *mcl, unsigned long va,
+ pte_t new_val, unsigned long flags)
+{
+ mcl->op = __HYPERVISOR_update_va_mapping;
+ mcl->result = 0;
+}
+
#else
-#define xen_create_contiguous_region(vstart, order, address_bits) ({0;})
+#define xen_create_contiguous_region(vstart, order, address_bits) (0)
#define xen_destroy_contiguous_region(vstart, order) do {} while (0)
#endif
#endif
#ifndef __ASSEMBLY__
- #ifdef MODULE
- extern int is_running_on_xen(void);
- #define running_on_xen (is_running_on_xen())
- #else
extern int running_on_xen;
- #endif
-#define XEN_HYPER_SSM_I asm("break 0x7");
-#define XEN_HYPER_GET_IVR asm("break 0x8");
+#define XEN_HYPER_SSM_I asm("break %0" : : "i" (HYPERPRIVOP_SSM_I))
+#define XEN_HYPER_GET_IVR asm("break %0" : : "i" (HYPERPRIVOP_GET_IVR))
/************************************************/
/* Instructions paravirtualized for correctness */
unsigned long reserved6[3456];
unsigned long vmm_avail[128];
unsigned long reserved7[4096];
- } mapped_regs_t;
+ };
+ typedef struct mapped_regs mapped_regs_t;
- typedef struct {
- } arch_vcpu_info_t;
+ struct arch_vcpu_info {
- struct mapped_regs *privregs;
- int evtchn_vector;
+ };
+ typedef struct arch_vcpu_info arch_vcpu_info_t;
typedef mapped_regs_t vpd_t;
- typedef struct {
+ struct arch_shared_info {
unsigned int flags;
unsigned long start_info_pfn;
- } arch_shared_info_t;
+
+ /* Interrupt vector for event channel. */
+ int evtchn_vector;
+ };
+ typedef struct arch_shared_info arch_shared_info_t;
- typedef struct {
+ struct arch_initrd_info {
unsigned long start;
unsigned long size;
- } arch_initrd_info_t;
+ };
+ typedef struct arch_initrd_info arch_initrd_info_t;
#define IA64_COMMAND_LINE_SIZE 512
- typedef struct vcpu_guest_context {
+ struct vcpu_guest_context {
#define VGCF_FPU_VALID (1<<0)
#define VGCF_VMX_GUEST (1<<1)
#define VGCF_IN_KERNEL (1<<2)
unsigned long sys_pgnr; /* System pages out of domain memory */
unsigned long vm_assist; /* VMASST_TYPE_* bitmap, now none on IPF */
- cpu_user_regs_t regs;
- mapped_regs_t *privregs;
- arch_shared_info_t shared;
- arch_initrd_info_t initrd;
+ struct cpu_user_regs regs;
- struct arch_vcpu_info vcpu;
++ struct mapped_regs *privregs;
+ struct arch_shared_info shared;
+ struct arch_initrd_info initrd;
char cmdline[IA64_COMMAND_LINE_SIZE];
- } vcpu_guest_context_t;
+ };
+ typedef struct vcpu_guest_context vcpu_guest_context_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
// dom0 vp op